<?php

/**
 * staticinfomation form base class.
 *
 * @method staticinfomation getObject() Returns the current form's model object
 *
 * @package    nutrition
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedInheritanceTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BasestaticinfomationForm extends infomationForm
{
  protected function setupInheritance()
  {
    parent::setupInheritance();

    $this->widgetSchema   ['alias_name'] = new sfWidgetFormInputText();
    $this->validatorSchema['alias_name'] = new sfValidatorString(array('max_length' => 255, 'required' => false));

    $this->widgetSchema   ['user_id'] = new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('user'), 'add_empty' => true));
    $this->validatorSchema['user_id'] = new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('user'), 'required' => false));

    $this->widgetSchema   ['groups'] = new sfWidgetFormChoice(array('choices' => array('关于学会' => '关于学会', '政策法规' => '政策法规')));
    $this->validatorSchema['groups'] = new sfValidatorChoice(array('choices' => array(0 => '关于学会', 1 => '政策法规'), 'required' => false));

    $this->widgetSchema->setNameFormat('staticinfomation[%s]');
  }

  public function getModelName()
  {
    return 'staticinfomation';
  }

}
